#ifndef _USERCONFIG_H_
#define _USERCONFIG_H_

#define MCU_APM32E103 			1
#define MCU_APM32F407 			2
#define MCU_APM32F411 			3
#define MCU_G32R501 				4
#define MCU_CF1106 					5
#define MCU_APM32F402 			6

#define APM32_MCU 					1
#define CF11xx_MCU 					2
#define G32R501_MCU 				3

#define EC_SLAVE_IO 				1
#define EC_SLAVE_AXIS 			2

#define AXIS_REAL						1
#define AXIS_VIRTUAL				2

#define ESC_GT100						1
#define ESC_GT120						2

#define R501BD_SERVO				1
#define R501BD_LAUNCH				2

/*--------------------------------------------------------------------------------------
------
------    User Configuration Define
------
--------------------------------------------------------------------------------------*/
#define MCU_TYPE 						MCU_APM32F402				//MCU Type Define
#define ESC_TYPE 						ESC_GT100					//ESC Type Define
#define EC_SLAVE_TYPE 			EC_SLAVE_IO				//Slave Type Define
#define AXIS_TYPE 					AXIS_VIRTUAL			//Axis Type Define
#define R501BD_TYPE					R501BD_LAUNCH			//Board Selection




#if (MCU_TYPE==MCU_APM32E103 || MCU_TYPE==MCU_APM32F407 || MCU_TYPE==MCU_APM32F411 || MCU_TYPE == MCU_APM32F402)
#define TARGET_MCU APM32_MCU
#elif(MCU_TYPE==MCU_G32R501)
#define TARGET_MCU G32R501_MCU
#elif(MCU_TYPE==MCU_TYPE_CF1106)
#define TARGET_MCU CF11xx_MCU
#endif


#if (TARGET_MCU == APM32_MCU)
	#include "main.h"
	#if (AXIS_TYPE == AXIS_REAL && MCU_TYPE == MCU_APM32F407)
	#include "motor.h"
	#include "foc.h"
	#endif
#elif  (TARGET_MCU == G32R501_MCU)
	#include "g32r501_device.h"
#elif (TARGET_MCU == CF11xx_MCU)
	#include "s21.h"
#endif





#endif
